package com.hmdp.utils;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"), FAIL(201, "失败"), SERVICE_ERROR(2012, "服务异常"), DATA_ERROR(204, "数据异常"), ILLEGAL_REQUEST(205, "非法请求"), REPEAT_SUBMIT(206, "重复提交"),

    LOGIN_AUTH(208, "未登陆"), PERMISSION(209, "没有权限"),

    ORDER_PRICE_ERROR(210, "订单商品价格变化"), ORDER_STOCK_FALL(204, "订单库存锁定失败"), CREATE_ORDER_FAIL(210, "创建订单失败"),

    COUPON_GET(220, "优惠券已经领取"), COUPON_LIMIT_GET(221, "优惠券已发放完毕"),

    URL_ENCODE_ERROR(216, "URL编码失败"), ILLEGAL_CALLBACK_REQUEST_ERROR(217, "非法回调请求"), FETCH_ACCESSTOKEN_FAILD(218, "获取accessToken失败"), FETCH_USERINFO_ERROR(219, "获取用户信息失败"),


    SKU_LIMIT_ERROR(230, "购买个数不能大于限购个数"), REGION_OPEN(240, "该区域已开通"), REGION_NO_OPEN(240, "该区域未开通"),


    NO_Data_Address(250, "没有设定默认地址"),

    Phone_error(260, "手机号码错误"), yzm_error(261, "   验证码不正确"),

    shop_Not(262, "商铺不存在"), shop_voucher_notStart(263, "优惠券没有开始"), shop_voucher_notStock(264, "优惠券没有库存"),

    shop_voucher_versionChange(265, "版本库改变"), shop_voucher_use(266, "优惠券已经有使用记录"), shop_voucher_lock(267, "重复获得锁。"),

    Blog_liked_cf(268, "重复点赞"),

    DATA_Not(269, "没有数据");


    private Integer code;

    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}